<template>
  <div class="flexbox">
    <div class="search hover:bg-white text-[#000080] w-36 flex items-center justify-center gap-5 bg-[#333] rounded-3xl">
      <div class="forAfter">
        <input type="text" placeholder="keyword search" required>
      </div>
      <div class="text-white searchText mt-2 font-black hover: text-[#000080]">搜索</div>
    </div>
  </div>
</template>

<script lang="ts" setup>

</script>

<style lang='scss'>
.searchText {
  font-size: 21px;
}

.flexbox {
  width: auto;
  height: 100%;
  color: white;
  line-height: 45px;
  display: flex;
  align-items: center;
}

.search:hover {
  .forAfter:after {
    content: "";
    background: #000080;
    width: 4px;
    height: 10px;
    position: absolute;
    top: 30px;
    right: 0;
    transform: rotate(140deg);
  }

  div>input {
    color: #000080;
    border: solid 3px #000080;
  }
  .searchText {
    color:#000080;
  }
}
.search>div {
  display: inline-block;
  position: relative;
}

.search>.forAfter:after {
  content: "";
  background: white;
  width: 4px;
  height: 10px;
  position: absolute;
  top: 30px;
  right: 0;
  transform: rotate(140deg);
}

.search>div>input {
  color: white;
  font-size: 8px;
  background: transparent;
  width: 20px;
  height: 20px;
  padding: 10px;
  border: solid 3px white;
  outline: none;
  border-radius: 35px;
}


</style>